# coding: utf-8
from PySide6.QtCore import QObject, Signal
from PySide6.QtGui import QColor


class SignalBus(QObject):
    """ Signal bus """
    wallpaperEnabledChanged = Signal(bool)  # 切换背景图信号
    wallpaperChanged = Signal(str)  # 背景图路径信号
    wallpaperOpacityChanged = Signal(int)  # 背景图透明度信号
    wallpaperLightColorChanged = Signal(QColor)  # 背景图亮色信号
    wallpaperDarkColorChanged = Signal(QColor)  # 背景图暗色信号

    micaEnableChanged = Signal(bool)  # 切换 mica 模式信号
    switchToSample = Signal(str, dict)  # 切换到某个示例
    reloadHistory = Signal()  # 重新加载历史记录

    appErrorSignal = Signal(str)  # 应用错误信号

signalBus = SignalBus()
